package com.demo.entity.Vo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

@Data
public class MessageSocketVo implements Serializable {
    @ApiModelProperty(value = "消息ID号")
    @TableId(value = "message_id", type = IdType.AUTO)
    private Integer messageId;

    @ApiModelProperty(value = "处理人员ID号")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty(value = "消息来源0.His推送 1.评估 2.其他")
    @TableField("message_source")
    @NotNull(message = "消息来源不能为空")
    private Integer messageSource;

    @ApiModelProperty(value = "消息状态0未处理1已处理")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "消息类型1评估提醒2诊断提醒3处置提醒4医嘱提醒5设备提醒6总结提醒")
    @TableField("message_type")
    @NotNull(message = "消息类型不能为空")
    private Integer messageType;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_time",fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdTime;

    @ApiModelProperty(value = "消息内容")
    @TableField("message_content")
    private String messageContent;

    @ApiModelProperty(value = "消息对象")
    @TableField("message_target")
    private String messageTarget;

    @ApiModelProperty(value = "处理方式")
    @TableField("message_deal_next")
    private String messageDealNext;

    @ApiModelProperty(value = "处理时间")
    @TableField("message_deal_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date messageDealTime;

    @ApiModelProperty(value = "消息级别")
    @TableField("message_rank")
    private Integer messageRank;

    @ApiModelProperty(value = "消息来源单号---药物医嘱时，来表示药物ID")
    @TableField("message_source_sn")
    private String messageSourceSn;

    //处理人姓名
    private String userName;
    private Date sendTime;
    //新入患者
    private String newPrient;
    //科室名称
    private String deptName;
    //病床名称
    private String wardName;
    //病床编号
    private String bedId;
    //患者姓名
    private String prientName;
    //消息主体
    private String mainContent;

    @ApiModelProperty(value = "患者ID")
    private Integer prientId;

    private Integer preventiveRiskRank;

}
